package com.wxh.bomb.netty.design.future.jdk;

import java.util.concurrent.Callable;

/**
 * @author wxh
 * @date：2017.10.10
 */
public class RealData implements Callable<String>{
    protected String data;

    public RealData(String data) {
        this.data = data;
    }

    @Override
    public String call() throws Exception {
        //利用sleep方法来表示真是业务是非常缓慢的
        try {
            System.out.println("处理比较慢，请等待...");
            Thread.sleep(5000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return data + "处理完了！";
    }
}
